<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" type="text/css" href="__CSS__/main.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/common.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/bootstrap.min.css" />
    <script type="text/javascript" src="__EXTEND__/lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="__EXTEND__/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="__EXTEND__/lib/layer/2.4/layer.js"></script>
    <![endif]-->
    <title></title>
</head>
<body>
<div class="contant">
<div class="row">
        <div class="top">合规部>贷款合同接收</div>
        <div class="content applylist">
            <div class="box">
                <h1>贷款合同接收</h1>
                <div class="list-block">
                    <div class="row">
                        <form action='' class="form-inline text-right m-b-5 fr">
                            <label>用户名称:</label> <input type="text" name="user_name" placeholder="请输入姓名" value={$_GET['user_name']} >
                            <label>身份证号:</label> <input type="text" name="identity_no" placeholder="请输入身份证号" value={$_GET['identity_no']} >
                            <label>部门:</label> <input type="text" name="department_name" placeholder="部门名" value={$_GET['department_name']}>
                            <button class="search" type="submit"><img src="__IMG__/search.png" alt="">查询</button>
                        </form>
                    </div>
                    <div class="row">
                        <table class="list">
                            <tr>
                                <th class="row-selected row-selected"><input type="checkbox" id="selectall" value="1" /></th>
                                <th>编号</th>
                                 <th>申请人</th>
                                 <th>身份证号</th>
                                 <th>手机号</th>
                                 <th>业务部门</th>
                                 <th>申请时间</th>
                                 <th>状态</th>
                                 <th>进入当前状态时间</th>
                                 <!-- <th>审核状态</th> -->
                                 <th>银行</th>
                                 <th>操作</th>
                            </tr>

                            <volist name="list" id="user">
                                <tr class="tbody thmb">
                                    <td><span class="ckbox"><input class="ids" type="checkbox" name="id[]" value="{$user.id}"/></span></td>
                                    <td>{$user.entry_no}</td>
                                    <td>{$user.user_name}</td>
                                    <td>{$user.identity_no}</td>
                                    <td>{$user.telephone}</td>
                                    <td>{$user.department_name}</td>
                                    <td>{$user.create_time|date='Y-m-d H:i:s', ###}</td>
                                    <td>贷款合同已送行</td>
                                    <td>{$user.update_time|date='Y-m-d H:i:s', ###}</td>
                                    <td>{$user.bank_short_name}</td>
                                    <td><a href="{:U('Contract/set_status', array('id' => $user['id'],'status'=>15))}">接收</a></td>
                                </tr>
                            </volist>
                        </table>
                        <div class="clearfix">
                            <button class="actBtn btn btn-default btn_50"" data-id='{$list.id}' data-status='15' type="button">批量接收</button>
                        </div>
                    </div>
                    {$page}
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
   $('#selectall').click(function(){
        if($(this).is(':checked')) {
            $('.thmb').each(function(){
                $(this).find('input').attr('checked',true);
            });
        } else {
            $('.thmb').each(function(){
                $(this).find('input').attr('checked',false);
            });
        }
    });
    $('.ckbox').click(function(){$('#selectall').attr('checked',false);});
    $('.actBtn').click(function(){
        var status = $(this).data('status'), id = $(this).data('id'), ids = '0';
        $.each($('.ids:checked'), function(i, v){ids += ',' + $(v).val();});
           if(ids == '0'){
                alert('请勾选需要操作的会员！');
            }else{
               $.post('{:U("Contract/batch")}',{ids:ids,status:status},function(data){
                  if(data.status==1){
                     alert(data.info);
                     location.reload();
                  }else{
                     alert(data.info);
                  }
               })
            }

    });
</script>
</body>
</html>